import config from "@/config"
import http from "@/utils/request"

export default {
	wechatAccount: {
		pageList: {
			url: config.API_URL+'/xunheng-wechat/wechatAccount/getPageList',
			name: "获取微信开发帐号分页列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		detail:{
			url: config.API_URL+'/xunheng-wechat/wechatAccount/getDetail/',
			name: "微信开发帐号详情",
			get: async function(id){
				return await http.get(this.url+id);
			}
		},
		save:{
			url: config.API_URL+'/xunheng-wechat/wechatAccount/save',
			name: "微信开发帐号新增",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		edit:{
			url: config.API_URL+'/xunheng-wechat/wechatAccount/edit',
			name: "微信开发帐号修改",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		delete:{
			url: config.API_URL+'/xunheng-wechat/wechatAccount/delByIds/',
			name: "微信开发帐号批量删除",
			delete: async function(ids){
				return await http.delete(this.url+ids);
			}
		},
		getSelectItem:{
			url: config.API_URL+'/xunheng-wechat/wechatAccount/getSelectItem',
			name: "微信开发帐号选择项",
			get: async function(){
				return await http.get(this.url);
			}
		}
	},
	woaMenu: {
		getMenu:{
			url: config.API_URL+'/xunheng-wechat/woaMenu/getMenu/',
			name: "获取微信公众号菜单",
			get: async function(appId){
				return await http.get(this.url+appId);
			}
		},
		saveAndDeploy:{
			url: config.API_URL+'/xunheng-wechat/woaMenu/saveAndDeploy/',
			name: "保存并发布menu",
			post: async function(appId,menu){
				return await http.post(this.url+appId,menu);
			}
		},
	},
	wechatOfficialAccountFans: {
		pageList: {
			url: config.API_URL+'/xunheng-wechat/wechatOfficialAccountFans/getPageList',
			name: "获取公众号粉丝分页列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		detail:{
			url: config.API_URL+'/xunheng-wechat/wechatOfficialAccountFans/getDetail/',
			name: "公众号粉丝详情",
			get: async function(id){
				return await http.get(this.url+id);
			}
		},
		delete:{
			url: config.API_URL+'/xunheng-wechat/wechatOfficialAccountFans/delByIds/',
			name: "公众号粉丝批量删除",
			delete: async function(ids){
				return await http.delete(this.url+ids);
			}
		},
		sync:{
			url: config.API_URL+'/xunheng-wechat/wechatOfficialAccountFans/sync/',
			name: "公众号粉丝同步",
			get: async function(appId){
				return await http.get(this.url+appId);
			}
		},
	},
}
